public class HomeWork12_06{
    public static void main(String[] args){
        DeleteRange dr = new DeleteRange();
        int[] arr = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        arr = dr.deleteArrRange(arr, 2, 5);
        for(int item : arr){
            System.out.println(item);
        }
    }
}

class DeleteRange{
    public int[] deleteArrRange(int[] arr, int head, int tail){
        int[] newArr = new int[arr.length - tail + head - 1];
        int j = 0;
        for(int i = 0; i < arr.length; i++){
            if(i < head || i > tail){
                newArr[j++] = arr[i];
            }
        }
        return newArr;
    }
}